home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 31 / Amiga Format CD31 (1998-09-02)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1998-10].iso / -coverdisks- / 115a / ppt / install < prev    next >
Text File  |  1998-07-29  |  7KB  |  282 lines

  1. ;
  2. ;  PPT Installer script
  3. ;
  4. ;  $Revision: 1.6 $
  5. ;      $Date: 1998/06/28 23:26:00 $
  6. ;
  7.  
  8. ;(message "\n"
  9. ;         "IMPORTANT!\n"
  10. ;         "\n"
  11. ;         "This is a pre-release version of PPT and\n"
  12. ;         "\n"
  13. ;         "NOT TO BE DISTRIBUTED\n"
  14. ;         "\n"
  15. ;         "without the written permission of the author"
  16. ;         (all)
  17. ;         )
  18.  
  19. (welcome "This is the PPT Installation utility."
  20.          "Thank you for choosing to test PPT.")
  21.  
  22. ;
  23. ;  Set defaults
  24. ;
  25.  
  26. (set ##installdir "Work:")
  27.  
  28. ; Processor
  29.  
  30. (set ##use020 (not (patmatch "68000|68010" (database "cpu"))))
  31.  
  32. ; FPU
  33.  
  34. (set ##use881 (not (patmatch "688|68040|68060" (database "cpu"))))
  35.  
  36. ; If user-level is expert, ask which versions to install.
  37.  
  38. (if (= @user-level 2)
  39.     (set ##use020
  40.          (askbool
  41.           (prompt "\n"
  42.                   "Do you wish to use the 68020+ optimized\n"
  43.                   "versions of the BGUI library and PPT?")
  44. ;                  "version of PPT?")
  45.           (help   (cat "It might be a good idea to install the version "
  46.                        "that best suits your Amiga's processor." ))
  47.           (default ##use020)
  48.           )
  49.          )
  50.   )
  51.  
  52. (debug "Use020 : " ##use020)
  53. (debug "Use881 : " ##use881)
  54.  
  55. ;
  56. ;  Ask the directory to be installed in
  57. ;
  58.  
  59. (set ##installdir
  60.     (askdir
  61.         (prompt "Choose the directory you wish to install\n"
  62.                 "PPT in.  A directory called 'PPT' will be\n"
  63.                 "created for you in this directory"
  64.         )
  65.         (help   (cat "Choose the top directory for PPT.  Installer will "
  66.                      "then create a directory called 'PPT' in the directory "
  67.                      "you chose and copy all of the PPT software in that "
  68.                      "directory.\n\n"
  69.                      @askdir-help) )
  70.         (default ##installdir)
  71.     )
  72. )
  73.  
  74. (debug "You chose" ##installdir)
  75.  
  76. ;
  77. ;   Tack on the dir name
  78. ;
  79.  
  80. (set @default-dest (tackon ##installdir "PPT"))
  81. (debug "You chose" @default-dest)
  82.  
  83. ;
  84. ;   Remove old modules
  85. ;
  86.  
  87. (complete 20)
  88.  
  89. (if (exists @default-dest)
  90.     (delete
  91.         (tackon @default-dest "modules/#?")
  92.         (prompt "Deleting previous installation")
  93.         (help   "Since PPT modules can change between releases, "
  94.                 "for now the previous installation must be deleted "
  95.                 "before the new one is installed.")
  96.         (confirm)
  97.         (all)
  98.     )
  99.     (debug "No previous installation")
  100. )
  101.  
  102. ;
  103. ;   Copy main executables
  104. ;
  105.  
  106. (complete 30)
  107.  
  108. (copyfiles
  109.     (prompt "Installing PPT executable")
  110.     (source (if (= ##use020 1) "ppt020" "ppt" ) )
  111.     (dest @default-dest)
  112.     (newname "ppt")
  113.     (help @copyfiles-help)
  114. )
  115.  
  116. (copyfiles
  117.     (prompt "Installing icon")
  118.     (source "ppt.info")
  119.     (dest   @default-dest)
  120.     (help   @copyfiles-help)
  121. )
  122.  
  123. ;; Copy docs
  124.  
  125. (complete 40)
  126.  
  127. (copyfiles
  128.     (prompt "Installing documents")
  129.     (source "Docs")
  130.     (dest (tackon @default-dest "Docs") )
  131.     (help (cat "Choose which document files you want to install. "
  132.                "I really recommend you install them all.\n\n"
  133.                @copyfiles-help) )
  134.     (all)
  135.     (infos)
  136.     (confirm)
  137. )
  138.  
  139. (complete 50)
  140.  
  141. (copyfiles
  142.     (prompt "Installing miscallaneous stuff")
  143.     (source "")
  144.     (choices "README" "HISTORY" "ReleaseNotes" "ppt.asc" "ModuleInfo")
  145.     (dest @default-dest)
  146.     (help (cat "Choose which additional files you wish to install. "
  147.                "Again, I recommend you to install these all, as these "
  148.                "contain the release notes and the ModuleInfo utility.\n\n"
  149.                @copyfiles-help) )
  150.     (infos)
  151.     (confirm)
  152. )
  153.  
  154. (complete 60)
  155.  
  156. (copyfiles
  157.     (prompt "Installing REXX scripts")
  158.     (source "rexx")
  159.     (dest (tackon @default-dest "rexx") )
  160.     (help (cat "Here you can choose not to install all of the REXX scripts. "
  161.                "I really recommend that you install them all.\n\n"
  162.                @copyfiles-help) )
  163.     (all)
  164.     (infos)
  165.     (confirm)
  166. )
  167.  
  168.  
  169. ;; PPT libraries
  170.  
  171. (complete 70)
  172.  
  173. (copyfiles
  174.     (prompt "Installing PPT external modules")
  175.     (source "modules")
  176.     (dest   (tackon @default-dest "modules") )
  177.     (help   (cat "Choose which external modules you'd like to install. "
  178.                  "If you wish to save space, you can remove those modules "
  179.                  "you think you're not going to need, such as the modules "
  180.                  "which have not been compiled for your processor.  However, "
  181.                  "PPT can figure out which processor your machine has and "
  182.                  "determine, which module is the best for you.  So you don't "
  183.                  "really need to remove any of these modules.\n\n"
  184.                  @copyfiles-help) )
  185.     (confirm)
  186.     (all)
  187. )
  188.  
  189. ;(copyfiles
  190. ;    (prompt "Copying PPT executables & modules")
  191. ;    (source "")
  192. ;    (dest @default-dest)
  193. ;    (pattern "~(libs)")
  194. ;    (help   @copyfiles-help)
  195. ;)
  196.  
  197.  
  198. (copyfiles
  199.     (prompt "Installing icons")
  200.     (source "/PPT.info")
  201.     (dest   (tackon @default-dest "/"))
  202.     (help   @copyfiles-help)
  203.     (infos)
  204. )
  205.  
  206. ;
  207. ;   Install libraries
  208. ;
  209.  
  210. (complete 80)
  211.  
  212. (copylib
  213.     (prompt "Copying BGUI library")
  214.     (confirm)
  215.     (source (if (= ##cpu020 1) ("libs/bgui.library_e") ("libs/bgui.library")))
  216.     (dest   "libs:")
  217.     (newname "bgui.library")
  218.     (help   @copylib-help)
  219. )
  220.  
  221. (copylib
  222.     (prompt "Copying BGUI floating point gadget")
  223.     (confirm)
  224.     (source "libs/bgui_float.gadget")
  225.     (dest   "SYS:Classes/Gadgets")
  226.     (help   @copylib-help)
  227. )
  228.  
  229. (copylib
  230.     (prompt "Copying BGUI palette gadget")
  231.     (confirm)
  232.     (source "libs/bgui_palette.gadget")
  233.     (dest   "SYS:Classes/Gadgets")
  234.     (help   @copylib-help)
  235. )
  236.  
  237.  
  238. ;(message "\n\n\nNow make sure you have BGUI 41.8 installed.  Also, do not "
  239. ;         "forget to install the BGUI palette gadget in your SYS:Classes/Gadgets "
  240. ;         "directory!")
  241.  
  242. ;
  243. ;   Make assigns
  244. ;
  245.  
  246. (complete 90)
  247.  
  248. (set ##jpegdir
  249.     (askdir
  250.         (prompt "You must now choose a place for any "
  251.                 "temporary JPEG files to be put in. "
  252.                 "(See Help for more info)"
  253.         )
  254.         (help   "The JPEG loader needs a JPEGTMP: assign "
  255.                 "in order to handle really large progressive "
  256.                 "or multi-scan files.  If you already happen "
  257.                 "to have this assign, just say 'Skip This Phase'. "
  258.                 "If not, then you should pick up a hard drive "
  259.                 "directory with plenty of space."
  260.         )
  261.         (default ##installdir)
  262.     )
  263. )
  264.  
  265. (makeassign "JPEGTMP" ##jpegdir)
  266.  
  267. (set ##jpegassign ("Assign >NIL: JPEGTMP: %s" ##jpegdir))
  268.  
  269. (startup "PPT JPEG loader"
  270.     (prompt ( "\nI shall now add the following line\nto your S:User-Startup:\n\n%s"
  271.                ##jpegassign)
  272.             )
  273.     (command ##jpegassign )
  274.     (help @startup-help)
  275. )
  276.  
  277. ;
  278. ;   The END.
  279. ;
  280. (complete 100)
  281.  
  282.